/*
 * @Author: xiaoyan
 * @Date: 2021-09-08 17:39:33
 * @LastEditors: xiaoyan
 * @LastEditTime: 2021-09-10 13:11:27
 * @Description: 路由
 * @FilePath: \vue-ts-basic\src\router\index.ts
 */
import Vue from 'vue';
import Router from 'vue-router';
import Home from '../views/home.vue';
import {listRouter} from "./modules/error"

Vue.use(Router);

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
    },
    {
        path: '/login',
        name: 'login',
        component: ()=>import('@/views/login/index.vue'),
    },
    ...listRouter,
    { path: '*', redirect: '/404' },
  ],
});
